import {createRouter, createWebHistory} from 'vue-router'

// 前端
export const ROOT_URL = '/';
export const Home = '/Home';
export const ParadiseLost = '/ParadiseLost';
export const WorldTreePage = '/WorldTreePage';
export const AboutPage = '/AboutPage';
export const YmlAddEdit = '/YmlAddEdit';
export const TianWen = '/TianWen';

export const routes = [
    {
        path: ROOT_URL,
        redirect: Home,
    },
    {
        path: Home,
        component: () => import('@/views/HomePage.vue'),
    },
    {
        path: ParadiseLost,
        component: () => import('@/views/ParadiseLost.vue'),
    },
    {
        path: WorldTreePage,
        component: () => import('@/views/TreePage.vue'),
    },
    {
        path: TianWen,
        component: () => import('@/views/TianWen.vue'),
    },
    {
        path: AboutPage,
        component: () => import('@/views/About.vue'),
    },
    {
        path: YmlAddEdit,
        component: () => import('@/views/YmlAddEdit.vue'),
    },
];
// import.meta.env.BASE_URL
const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
